/*
 *  This file is part of LifeBudget - Copyright 2010 Clifton Eaton
 *  ------------------------------------------------------------------
 *  LifeBudget is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  LifeBudget is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with LifeBudget.  If not, see <http://www.gnu.org/licenses/>.
 */
package org.lifebudget.app.client.service;

import java.util.List;

import org.lifebudget.app.client.mvc.model.Category;
import org.lifebudget.app.server.CategoryServiceImpl;

import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;

/**
 * The Interface CategoryService defines the RPC methods to be implemented 
 * by the GWT proxy for {@link CategoryServiceAsync} and for the {@link CategoryServiceImpl}. 
 * Handles client-server communication for {@link Category} operations.
 */
@RemoteServiceRelativePath("category")
public interface CategoryService extends RemoteService {
	
	/**
	 * Gets the all categories. Can be used to get all Categories
	 * including the default Category, or exclude it.
	 *
	 * @param includeDefault <code>true</code> includes the default category in the 
	 * 						returned results, <code>false</code> excludes it.
	 * @return the all categories
	 */
	public List<Category> getAllCategories(boolean includeDefault);

	/**
	 * Removes the category by setting the archived field to <code>true</code>.
	 *
	 * @param category the Category to remove.
	 * @return the list of current Categories after the removal of the 
	 * 					passed in Category.
	 */
	public List<Category> removeCategory(Category category);

	/**
	 * Update categories and return the updated Category list.
	 *
	 * @param category the categories to update.
	 * @return the current Categories after the update.
	 */
	public List<Category> updateCategories(List<Category> category);
}
